function Init()
{
  if (parent.frames("SelBut").window.document.all.tags("BUTTON").length>0)
     parent.frames("SelBut").document.all.item("btnRightAll").disabled=(FunctionList.length>0?0:1);
}

function AddFunction()
{
 if(document.all.item("FunctionList").selectedIndex>=0)
 	parent.frames("SelBut").SelectThis();
}

function SelectThis()
{
  var index;
  index=FunctionList.selectedIndex;
  if (parent.frames("AddFunction").PreiorSel!="")
  {
    parent.frames("AddFunction").document.all.item("Tb").rows(parent.frames("AddFunction").PreiorSel).className="Normal";
    parent.frames("SelBut").document.all.item("btnLeft").disabled=1;
  }
  parent.frames("SelBut").document.all.item("btnRight").disabled=(index>=0?0:1);
}

